import request from '@/utils/request'

export default {
  // 列表
  query(data) {
    return request({
      url: `/v1/purchase-config/purchase-account/list`,
      method: 'post',
      data
    })
  },
  // 支付宝账户
  getAlipay() {
    return request({
      url: `/v1/finance/alipay-account/account`,
      method: 'get'
    })
  },
  // 添加采购账号
  create(data) {
    return request({
      url: `/v1/purchase-config/purchase-account/create`,
      method: 'post',
      data
    })
  },
  // 编辑采购账号
  edit(data) {
    return request({
      url: `/v1/purchase-config/purchase-account/edit`,
      method: 'post',
      data
    })
  },
  // 采购账号明细
  detail(params) {
    return request({
      url: `/v1/purchase-config/purchase-account/detail`,
      method: 'get',
      params
    })
  },
  // 采购账号导出
  export() {
    return request({
      url: `/v1/purchase-config/purchase-account/export`,
      method: 'post',
      responseType: 'blob',
      returnData: true
    })
  },
}
